<%@page import="com.erms.dao.DepartmentDAO"%>
<%@page import="com.erms.dao.UserDAO"%>
<%@page import="com.erms.bean.User"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	request.setAttribute("path", path);//只是为了让el表达式更短一些
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<base href="<%=basePath%>">

<title>个人中心</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="expires" content="0">
<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="This is my page">
<link rel="icon" href="favicon.ico">

<!-- Bootstrap core CSS -->
<link href="${path}/res/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<link href="${path}/res/css/bootstrap-theme.min.css" rel="stylesheet">

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
      <script src="${path}/res/js/html5shiv.min.js"></script>
      <script src="${path}/res/js/respond.min.js"></script>
    <![endif]-->
</head>

<body class="container">
	<jsp:include page="/header.jsp"></jsp:include>
	<!-- =======================header=========================== -->
	<div class="container">
		<div class="col-sm-offset-3">
			<form action="accountSave" class="form-horizontal" role="form"
				name="form1" method="post">
				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-6">
						<p id="fail_reason" class="form-control-static text-warning">${failReason}</p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">学号</label>
					<div class="col-sm-6 ">
						<p class="form-control-static">${user.id}</p>
					</div>
				</div>				
				<div class="form-group">
					<label class="col-sm-2 control-label">姓名</label>
					<div class="col-sm-6 ">
						<p class="form-control-static">${user.name}</p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">班级</label>
					<div class="col-sm-6 form-control-static">${user.classNum}</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">性别</label>
					<div class="col-sm-6 form-control-static">${user.sex}</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">学院</label>
					<div class="col-sm-6 form-control-static">${department}</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">专业</label>
					<div class="col-sm-6 form-control-static">${major}</div>
				</div>
				<%-- <div class="form-group">
					<label class="col-sm-2 control-label" for="birthday">出生日期</label>
					<div class="col-sm-6">
						<input id="birthday" class="form-control" type="date"
							value="${user.birthday}">
					</div>
				</div> --%>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="password">密码</label>
					<div class="col-sm-6">
						<input id="password" class="form-control" name="password"
							type="password" value="${user.password}">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="email">邮箱</label>
					<div class="col-sm-6">
						<input id="email" class="form-control" name="email" type="email"
							value="${user.email}">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="phone">电话</label>
					<div class="col-sm-6">
						<input id="phone" class="form-control" name="phone" type="tel"
							value="${user.phone}">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="dormitory">宿舍地址</label>
					<div class="col-sm-6">
						<input id="dormitory" class="form-control" name="dormitory"
							type="text" size="30" value="${user.dormitory}">
					</div>
				</div>
				<div class="form-group" style='margin-top:30px;'>
					<input id="save_btn"
						class="col-sm-offset-4 col-xs-offset-4 btn btn-success btn-lg"
						type="submit" value="save">
				</div>
			</form>
		</div>
	</div>


	<!-- ========================footer========================== -->
	<jsp:include page="/footer.jsp"></jsp:include>
	<!-- Bootstrap core JavaScript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	<script src="${path}/res/js/jquery.min.js"></script>
	<script src="${path}/res/js/bootstrap.min.js"></script>

</body>
</html>
